{include file="User@Public:header"/}
{include file="User@Public:nav"/}
<div class="container">
	<div class="row">
		<div class="col-md-2">
			{include file="User@Public:left_menu"/}
		</div>
		<div class="col-md-10 cf">
			<div class="panel panel-default cf">
				<div class="panel-heading">
					<h3 class="panel-title">我的{$model['title']}</h3>
				</div>
				<div class="panel-body">
					<div class="clearfix m10">
						<a href="{:U($model['name'].'/add',array('model_id'=>$model['id']))}" class="btn btn-primary">新增</a>
						<button url="{:U($model['name'].'/del',array('model_id'=>$model['id']))}" class="btn btn-danger ajax-post confirm"  target-form="ids">删除</button>
					</div>
					<div class="table-responsive clearfix">
						{if condition="empty($list)"}
							<p>暂无数据！</p>
						{else/}
							<table class="table table-hover">
								<thead>
									<tr>
										<th width="30"><input class="checkbox check-all" type="checkbox"></th>
										<td>ID</td>
										<th>标题</th>
										<th>发布人</th>
										<th>创建时间</th>
										<th>更新时间</th>
										<th>状态</th>
										<th>操作</th>
									</tr>
								</thead>
								
								<tbody>
									{volist name="list" id="vo"}
									<tr>
										<td><input class="ids row-selected" type="checkbox" name="id[]" value="{$vo['id']}"></td>
										<td>{$key+1}</td>
										<td>{$vo['title']}</td>
										<td>{$vo['uid']|get_nickname}</td>
										<td>{$vo['create_time']|time_format}</td>
										<td>{$vo['update_time']|time_format}</td>
										<td>{$vo['status'] ? '正常' : '待审核'}</td>
										<td>
											<a href="{:U($model['name'].'/edit',array('id'=>$vo['id'],'model_id'=>$model['id']))}" >编辑</a>
											<a href="{:U($model['name'].'/del',array('id'=>$vo['id'],'model_id'=>$model['id']))}" class="ajax-get confirm">删除</a>
										</td>
									</tr>
									{/volist}
								</tbody>
							</table>
						{/if}
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
{include file="User@Public:footer"/}